<?php
header("Content-Type: text/html; charset=ISO-8859-1",true);
if(!isset($_SESSION))session_start();
if(!isset($_SESSION['usuario'])){
	session_destroy();
	header("location:index.php"); exit;
	}

include 'classes/classeUpload.php';
extract($_POST);
$vetor=$numero-$numero+1;

while ($vetor <= $numero){
    echo $vetor++;
}



$up = new classeUpload($numero, $tipo);

//$up->checarUp();

/*
var_dump($_POST, $_FILES, $_FILES['arquivo1']['name']);
$teste = $_FILES['arquivo1'];
var_dump($teste['name']);
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Upload de Arquivo</title>

<style type="text/css">
#fundo {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 10px;
	text-decoration: none;
	background-color: #CCC;
	height: 460px;
	width: 610px;
	margin-left: -305px;
	left: 50%;
	position: absolute;
	margin-top: 1px;
	overflow: auto;
	text-align: center;
}
body {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 10px;
	text-decoration: none;
	background-color: #000;
}
a:link {
	font-size: 12px;
	color: #00F;
	text-decoration: none;
	font-weight: lighter;
	font-style: italic;
	cursor: pointer;
}
a:hover {
	color: #FF0;
	text-decoration: none;
	font-size: 14px;
	font-style: normal;
	font-weight: bolder;
}
</style>
<script type="text/javascript" src="js/autocomplete.js"></script>
<script type="text/javascript" src="js/jquery-1.5.1.js"></script>
<script type="text/javascript" src="js/jscript.js"></script>
<link href="CSS/autocomplete.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
$(document).ready(function(){

trocarSetor('setor0', 'past0');
trocarSetor('setor1', 'past1');
trocarSetor('setor2', 'past2');
trocarSetor('setor3', 'past3');
trocarSetor('setor4', 'past4');

$(".opcao").html("Selecione o setor");
  $(".ppst").html("Selecione o setor"); 
	new Autocomplete("pasta", function() {
		this.setValue = function( id, estado, sigla ) {
			$("#id_val").val(id);
			$("#estado_val").val(estado);
			$("#sigla_val").val(sigla);
		}
		if ( this.isModified )
			this.setValue("");
		if ( this.value.length < 1 && this.isNotClick ) 
			return ;
		return "ajax.php?q=" + this.value;
	});


});


</script>



<style type="text/css">
#apDiv1 {
	position:absolute;
	left:510px;
	top:169px;
	width:82px;
	height:13px;
	z-index:1;
}
#apDiv2 {	position:absolute;
	left:511px;
	top:2px;
	width:82px;
	height:13px;
	z-index:1;
}
#fundo #apDiv2:hover {
	font-weight: bolder;
}
</style>
</head>

<body>


<div id="fundo">
<span id=""> Sem Seguimento</span>
    
<br /> 
<form name="comseguimento" method="post" action="query.php" enctype="multipart/form-data" id="form1">
<p>
<br />
<label>1-Selecione o arquivo</label><br /><input type="file" name="arquivo[]" /><br />
<br /><label>Referencia do arquivo</label><br /><input type="text" name="referencia[]" /><br />
<br /><label>Descricao do arquivo </label><span id="tes"></span><br /><textarea name="descricao[]" cols="29" rows="8" id="display" onkeyup="maxChars(255, 'display', 'tes');" ></textarea>
<?php 
$up->listaArr(0);
?>
<br />
Pasta<br />
<select name="past[]" id="past0" >
<option id='ppst' class="ppst"></option>
</select>
<br />
<br /> 
<p>
<br />
<label>2-Selecione o arquivo</label><br /><input type="file" name="arquivo[]" /><br />
<br /><label>Referencia do arquivo</label><br /><input type="text" name="referencia[]" /><br />
<br /><label>Descricao do arquivo </label><span id="tes1"></span><br /><textarea name="descricao[]" cols="29" rows="8" id="display1" onkeyup="maxChars(255, 'display1', 'tes1');" ></textarea>
<?php 
$up->listaArr(1);
?>
<br />
Pasta<br />
<select name="past[]" id="past1">
<option id='ppst' class="ppst"></option>
</select>
<br />
<br /> 
<p>
<br />
<label>3-Selecione o arquivo</label><br /><input type="file" name="arquivo[]" /><br />
<br /><label>Referencia do arquivo</label><br /><input type="text" name="referencia[]" /><br />
<br /><label>Descricao do arquivo </label><span id="tes2"></span><br /><textarea name="descricao[]" cols="29" rows="8" id="display2" onkeyup="maxChars(255, 'display2', 'tes2');" ></textarea>
<?php 
$up->listaArr(2);
?>
<br />
Pasta<br />
<select name="past[]" id="past2">
<option id='ppst' class="ppst"></option>
</select>
<br />
<br /> 
<p>
<br />
<label>4-Selecione o arquivo</label><br /><input type="file" name="arquivo[]" /><br />
<br /><label>Referencia do arquivo</label><br /><input type="text" name="referencia[]" /><br />
<br /><label>Descricao do arquivo </label><span id="tes3"></span><br /><textarea name="descricao[]" cols="29" rows="8" id="display3" onkeyup="maxChars(255, 'display3', 'tes3');" ></textarea>
<?php 
$up->listaArr(3);
?>
<br />
Pasta<br />
<select name="past[]" id="past3">
<option id='ppst' class="ppst"></option>
</select>
<br />
<br /> 
<p>
<br />
<label>5-Selecione o arquivo</label><br /><input type="file" name="arquivo[]" /><br />
<br /><label>Referencia do arquivo</label><br /><input type="text" name="referencia[]" /><br />
<br /><label>Descricao do arquivo </label><span id="tes4"></span><br /><textarea name="descricao[]" cols="29" rows="8" id="display4" onkeyup="maxChars(255, 'display4', 'tes4');" ></textarea>
<?php 
$up->listaArr(4);
?>
<br />
Pasta<br />
<select name="past[]" id="past4">
<option id='ppst' class="ppst"></option>
</select>
<br />
<p>
<p>
<p>
  <input type="submit"  value="ENVIAR ARQUIVOS" />
  <br />
  <br />
<p><input type="hidden" name="seguimento" value="seguimento2" /></p>
</p>
</form>
<div id="apDiv2" style="cursor:pointer" onclick="window.close();">Fechar Janela</div>
</div><!-- fim div fundo -->
</body>
</html>